<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>绑定class对象语法</title>
    <script src="./lib/vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- <div v-bind:class="{active:isActive,'text-danger':hasError}">绑定class对象</div> -->
        <!-- <div v-bind:class="classobject">绑定多个class对象</div> -->
        <div :class="[activeClass,errorClass]">直接数组方式</div>
    </div>
</body>
<script>
     var vm = new Vue({
         el:"#app",
         data:{
            //  isActive:true,
            //  hasError:false,
            //  classobject:{active:true,'text-danger':false}
            activeClass:'active',
            errorClass:'text-danger'


         },
         methods:{

         }
     })
</script>
</html>